<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body style="background-color:#3C9">
	<?php
		$strSelect = Controller::getStrSelect();
		$resources = Controller::getArrayResources();
	?>
    
	<script type="text/javascript">
		function changeSettlement(val, url)
		{
			window.location = url + "&id=" + val.value;	
		}
	</script>
	
	
    <?php $this->widget('bootstrap.widgets.BootNavbar', array(
			'fixed'=>true,
			'brand'=>Yii::app()->name,
			'brandUrl'=>'#',
			'collapse'=>true, // requires bootstrap-responsive.css
			'items'=>array(
				array(
					'class'=>'bootstrap.widgets.BootMenu',
					'items'=>array(
						array('label'=>'Авторизация', 'url'=>array('auth/signin'), 'visible'=>Yii::app()->user->isGuest),
						array('label'=>'Регистрация', 'url'=>array('auth/signup'), 'visible'=>Yii::app()->user->isGuest),
						array('label'=>'Поле', 'url'=>array('field/fields'), 'visible'=>!Yii::app()->user->isGuest),
						array('label'=>'Город', 'url'=>array('building/buildings'), 'visible'=>!Yii::app()->user->isGuest),
						array('label'=>'Карта', 'url'=>array('#'), 'visible'=>!Yii::app()->user->isGuest),
						array('label'=>'Отчеты', 'url'=>array('#'), 'visible'=>!Yii::app()->user->isGuest),
						array('label'=>'Профиль', 'url'=>array('profile/profile'), 'visible'=>!Yii::app()->user->isGuest),
						array('label'=>'Выход', 'url'=>array('auth/logout'), 'visible'=>!Yii::app()->user->isGuest),
					),
				),
				
				(!Yii::app()->user->isGuest)?
				'<form class="navbar-search pull-left" action="">' . $strSelect . '</form>':
				"",
				
				array(
					'class'=>'bootstrap.widgets.BootMenu',
					'htmlOptions'=>array('class'=>'pull-right'),
					'items'=>$resources
				),
				
			),
			
		));
	?>

  <div class="container-fluid">
    	<div class="row-fluid">
    		<?php echo $content; ?>
        </div>
	</div>
</body>
</html>
